Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 10, 2025

This PR simplifies the seed data import configuration based on maintainer feedback by removing command line flags and using a clearer environment variable name.

Key Changes

Configuration Simplification

  • Renamed: MCP_REGISTRY_SEED_FILE_PATHMCP_REGISTRY_SEED_FROM
  • Removed: --seed-file-path command line flag to eliminate configuration complexity

Improved User Experience

Users now configure seed data import using a single, clear environment variable:

# Before (multiple ways to configure)
MCP_REGISTRY_SEED_FILE_PATH=data/seed.json ./registry
./registry --seed-file-path=data/seed.json

# After (simplified single method)
MCP_REGISTRY_SEED_FROM=data/seed.json ./registry

Registry Composability

The composability workflow is now simplified while maintaining all functionality:

# Start first registry with seed data
MCP_REGISTRY_SEED_FROM=data/seed.json ./registry

# Start second registry importing from first via pagination
MCP_REGISTRY_SEED_FROM=http://localhost:8080 ./registry

Technical Implementation

  • Maintains full backward compatibility for import functionality
  • All existing seed data sources continue to work (local files, HTTP URLs, registry URLs)
  • Automatic pagination through /v0/servers endpoint remains unchanged
  • Configurable delays between requests preserved

Benefits

  • Reduced complexity: Single configuration method instead of multiple
  • Clearer naming: SEED_FROM better describes the source of seed data
  • Easier maintenance: Fewer configuration paths to test and document
  • Consistent patterns: Aligns with other environment-variable-only configuration

All existing functionality is preserved while providing a cleaner, more maintainable configuration interface.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Seed data export/import composability Implement seed data export/import composability with HTTP support Jul 10, 2025
Copilot finished work on behalf of toby July 10, 2025 22:33
Copilot AI requested a review from toby July 10, 2025 22:33
Copilot finished work on behalf of toby July 11, 2025 01:07
@toby toby force-pushed the copilot/fix-38 branch from ffe81c1 to f0e87b7 Compare July 23, 2025 00:58
Copilot finished work on behalf of toby July 23, 2025 01:13
@zmzlois
Copy link

zmzlois commented Jul 30, 2025

any timeline on merging this?

@domdomegg
Copy link
Member

Is there a reason this doesn't use ServersHandler under the hood and we expose a new /v0/seed.json? If it's possible to reuse the existing simple endpoints I think we should do that.

@toby
Copy link
Member

toby commented Aug 6, 2025

@domdomegg the main reason is that this new endpoint isn't paginated and returns everything in one go. I agree we should try to unify them though. Let me see if I can get that in here.

@toby
Copy link
Member

toby commented Aug 6, 2025

@copilot instead of creating a new /v0/seed.json endpoint, use the /v0/servers endpoint instead. The import should paginate through all of the results until every server is imported. By default it should wait 10 seconds between page calls. Make the --seed-file-path argument take the root URL of another registry (in addition to a seed.json file as an option). The user should have no need to specify the /v0/servers path.

Copy link
Contributor Author

Copilot AI commented Aug 6, 2025

@copilot instead of creating a new /v0/seed.json endpoint, use the /v0/servers endpoint instead. The import should paginate through all of the results until every server is imported. By default it...

Replaced the /v0/seed.json endpoint with paginated /v0/servers endpoint usage as requested. The import now automatically paginates through all results with 10-second delays between requests. Users can provide registry root URLs (like http://localhost:8080) and the system automatically appends /v0/servers and handles pagination. Added comprehensive tests demonstrating the new functionality. Changes committed in f5471dd.

Copilot AI changed the title Implement seed data export/import composability with HTTP support Refactor seed data composability to use existing /v0/servers endpoint with pagination Aug 6, 2025
Copilot finished work on behalf of toby August 6, 2025 17:51
Copilot finished work on behalf of toby August 6, 2025 18:23
Copilot finished work on behalf of toby August 6, 2025 19:02
Copilot finished work on behalf of toby August 6, 2025 19:57
@toby toby force-pushed the copilot/fix-38 branch 4 times, most recently from 66e3a9a to ebb353d Compare August 6, 2025 22:23
@toby toby marked this pull request as ready for review August 7, 2025 16:41
@toby toby changed the title Refactor seed data composability to use existing /v0/servers endpoint with pagination Seed data composability to use existing /v0/servers endpoint with pagination Aug 7, 2025
Copy link
Member

@domdomegg domdomegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am fine if you want to go ahead and merge this, I think at the moment things that would make me more excited to merge it are:

  • Support for doing a sync other than a one time import. I think this might need an updatedSince param or something in the servers spec, and then fetch that on some cron job.
  • Dropping the command line args stuff, unless there is strong reason it can't just be env vars
  • Cleaning up some of the README comments

README.md Outdated

**Configuration:** The Docker images support all environment variables listed in the [Configuration](#configuration) section. For production deployments, you'll need to configure the database connection and other settings via environment variables.

### Command Line Flags
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should: I think I'd prefer us not to accept command line flags, given we already have env vars. More ways of configuring things adds complexity to maintain and test, and for users to reason about IMO.

Open to pushback if you think command line flags are really needed here.

This enables true composability where registry instances can be distributed and synchronized, with new instances importing data from existing ones via HTTP.


## Testing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this block: think it reappeared as a result of merge conflict. This is already documented elsewhere.

@modelcontextprotocol modelcontextprotocol deleted a comment from Copilot AI Aug 8, 2025
@modelcontextprotocol modelcontextprotocol deleted a comment from Copilot AI Aug 8, 2025
@modelcontextprotocol modelcontextprotocol deleted a comment from Copilot AI Aug 8, 2025
@modelcontextprotocol modelcontextprotocol deleted a comment from Copilot AI Aug 8, 2025
@modelcontextprotocol modelcontextprotocol deleted a comment from Copilot AI Aug 8, 2025
@modelcontextprotocol modelcontextprotocol deleted a comment from Copilot AI Aug 8, 2025
@modelcontextprotocol modelcontextprotocol deleted a comment from Copilot AI Aug 8, 2025
@toby
Copy link
Member

toby commented Aug 8, 2025

@copilot remove the /v0/seed.json endpoint, since we can now use the /v0/servers endpoint for import. Also rename MCP_REGISTRY_SEED_FILE_PATH to MCP_REGISTRY_SEED_FROM and update all code to reflect that change. Also remove the --seed-file-path flag and just rely on the MCP_REGISTRY_SEED_FROM environment variable.

Copy link
Contributor Author

Copilot AI commented Aug 8, 2025

@copilot remove the /v0/seed.json endpoint, since we can now use the /v0/servers endpoint for import. Also rename MCP_REGISTRY_SEED_FILE_PATH to MCP_REGISTRY_SEED_FROM and update all code to r...

Changes implemented as requested:

  1. ✅ Confirmed /v0/seed.json endpoint was already removed (no references found in codebase)
  2. ✅ Renamed MCP_REGISTRY_SEED_FILE_PATH to MCP_REGISTRY_SEED_FROM
  3. ✅ Removed --seed-file-path flag - now relies only on environment variable

All tests pass and the configuration is now simplified. Changes in commit 7155c92.

Copilot AI changed the title Seed data composability to use existing /v0/servers endpoint with pagination Simplify seed data configuration by removing command line flags and renaming environment variable Aug 8, 2025
Copilot AI requested a review from toby August 8, 2025 02:17
Copilot finished work on behalf of toby August 8, 2025 02:17
Copy link
Member

@domdomegg domdomegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@domdomegg
Copy link
Member

The last change was made by Copilot and requires additional review. At least 1 more approval is needed from a reviewer with write access. Approvals from users that collaborated with Copilot on changes will not satisfy review requirements.

Not quite sure why I can't merge this normally - going to bypass rules because I think this is a rules configuration issue?

@domdomegg domdomegg merged commit 9c49c8b into main Aug 8, 2025
5 checks passed
@domdomegg domdomegg deleted the copilot/fix-38 branch August 8, 2025 12:42
domdomegg pushed a commit that referenced this pull request Aug 8, 2025
…enaming environment variable (#175)

This PR simplifies the seed data import configuration based on
maintainer feedback by removing command line flags and using a clearer
environment variable name.

## Key Changes

### Configuration Simplification
- **Renamed**: `MCP_REGISTRY_SEED_FILE_PATH` → `MCP_REGISTRY_SEED_FROM`
- **Removed**: `--seed-file-path` command line flag to eliminate
configuration complexity

### Improved User Experience
Users now configure seed data import using a single, clear environment
variable:

```bash
# Before (multiple ways to configure)
MCP_REGISTRY_SEED_FILE_PATH=data/seed.json ./registry
./registry --seed-file-path=data/seed.json

# After (simplified single method)
MCP_REGISTRY_SEED_FROM=data/seed.json ./registry
```

### Registry Composability
The composability workflow is now simplified while maintaining all
functionality:

```bash
# Start first registry with seed data
MCP_REGISTRY_SEED_FROM=data/seed.json ./registry

# Start second registry importing from first via pagination
MCP_REGISTRY_SEED_FROM=http://localhost:8080 ./registry
```

## Technical Implementation
- Maintains full backward compatibility for import functionality
- All existing seed data sources continue to work (local files, HTTP
URLs, registry URLs)
- Automatic pagination through `/v0/servers` endpoint remains unchanged
- Configurable delays between requests preserved

## Benefits
- **Reduced complexity**: Single configuration method instead of
multiple
- **Clearer naming**: `SEED_FROM` better describes the source of seed
data
- **Easier maintenance**: Fewer configuration paths to test and document
- **Consistent patterns**: Aligns with other environment-variable-only
configuration

All existing functionality is preserved while providing a cleaner, more
maintainable configuration interface.

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
start the survey.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Avinash Sridhar <[email protected]>
Co-authored-by: Toby Padilla <[email protected]>
Co-authored-by: toby <[email protected]>
@toby
Copy link
Member

toby commented Aug 8, 2025

It's merged now @zmzlois

@zmzlois
Copy link

zmzlois commented Aug 9, 2025

It's merged now @zmzlois

thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants